<?php
include "config.inc.php";
include "Model.class.php";
include "functions.inc.php";

$user=M('user');

// 执行查询
// $rows=$user->field('id,username')->where('id>3')->order('id desc')->select();
$rows=$user->select();
echo "<pre>";
print_r($rows);
echo "</pre>";

// 执行删除
echo $user->where('id=4')->delete();

// 执行插入
$time=time();
echo $user->field('username,password,time')->insert("'user14','username',{$time}")->add();

echo $user->field("username='ddd',password='333'")->where('id=15')->update();

?>